package com.lvyq.controller;

import com.alibaba.fastjson.JSONObject;
import com.lvyq.model.order.Order;
import com.lvyq.service.OrderService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: weg
 * @description:
 * @author: lvyq
 * @create: 2023-03-08 10:12
 **/
@RestController
@RequestMapping("/order")
public class OrderController {

    @Resource
    public OrderService orderService;


    /** 
    * @Description: 保存指令
    * @params:  * @param data
    * @return: {@link java.lang.Object}
    * @Author: lvyq
    * @Date: 2023/3/8 10:19
    */
    @PostMapping("/saveOrder")
    public JSONObject saveOrder(@RequestBody Order data){
        return orderService.saveOrder(data);
    }


}
